package com.igeek.compus.backend.observer;

public class Test {

    public static void main(String[] args) {
        OrderService orderService = new OrderService();

        // 注册观察者
        orderService.registerObserver(new InventoryService());
        orderService.registerObserver(new ShopCartService());

        // 通知观察者
        orderService.notifyAllObserver();
    }
}
